# encoding: utf-8

require 'rubygems'
require 'bundler'
require 'rake'
require 'jeweler'
require 'rake/testtask'
require 'rdoc/task'

begin
  Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
  $stderr.puts e.message
  $stderr.puts "Run `bundle install` to install missing gems"
  exit e.status_code
end

task :default => :test

Jeweler::Tasks.new do |gem|
  gem.name = "fabriq"
  gem.homepage = "http://github.com/rubyphunk/fabriq"
  gem.license = "MIT"
  gem.summary = "A Skype bot fabriqation hall"
  gem.description = "A daemon that allows you to run Skype bots and give them power through plugins."
  gem.email = "rubyphunk@gmail.com"
  gem.authors = ["Andreas Wolff"]
end
Jeweler::RubygemsDotOrgTasks.new

Rake::TestTask.new(:test) do |test|
  test.pattern = 'spec/**/*_spec.rb'
  test.verbose = true
end

Rake::RDocTask.new do |rdoc|
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title = "Fabriq #{version}"
  rdoc.rdoc_files.include('README*')
  rdoc.rdoc_files.include('lib/**/*.rb')
end
